package com.opencodez.util;

public enum Currency {

	AED("AED","United Arab Emirates Dirham"),
	AFN("AFN","Afghan Afghani"),
	ALL("ALL","Albanian Lek"),
	AMD("AMD","Armenian Dram"),
	ANG("ANG","Netherlands Antillean Guilder"),
	AOA("AOA","Angolan Kwanza"),
	ARS("ARS","Argentine Peso"),
	AUD("AUD","Australian Dollar"),
	AWG("AWG","Aruban Florin"),
	AZN("AZN","Azerbaijani Manat"),
	BAM("BAM","Bosnia-Herzegovina Convertible Mark"),
	BBD("BBD","Barbadian Dollar"),
	BDT("BDT","Bangladeshi Taka"),
	BGN("BGN","Bulgarian Lev"),
	BHD("BHD","Bahraini Dinar"),
	BIF("BIF","Burundian Franc"),
	BMD("BMD","Bermudan Dollar"),
	BND("BND","Brunei Dollar"),
	BOB("BOB","Bolivian Boliviano"),
	BRL("BRL","Brazilian Real"),
	BSD("BSD","Bahamian Dollar"),
	BTC("BTC","Bitcoin"),
	BTN("BTN","Bhutanese Ngultrum"),
	BWP("BWP","Botswanan Pula"),
	BYN("BYN","New Belarusian Ruble"),
	BYR("BYR","Belarusian Ruble"),
	BZD("BZD","Belize Dollar"),
	CAD("CAD","Canadian Dollar"),
	CDF("CDF","Congolese Franc"),
	CHF("CHF","Swiss Franc"),
	CLF("CLF","Chilean Unit of Account (UF)"),
	CLP("CLP","Chilean Peso"),
	CNY("CNY","Chinese Yuan"),
	COP("COP","Colombian Peso"),
	CRC("CRC","Costa Rican Col\u00f3n"),
	CUC("CUC","Cuban Convertible Peso"),
	CUP("CUP","Cuban Peso"),
	CVE("CVE","Cape Verdean Escudo"),
	CZK("CZK","Czech Republic Koruna"),
	DJF("DJF","Djiboutian Franc"),
	DKK("DKK","Danish Krone"),
	DOP("DOP","Dominican Peso"),
	DZD("DZD","Algerian Dinar"),
	EGP("EGP","Egyptian Pound"),
	ERN("ERN","Eritrean Nakfa"),
	ETB("ETB","Ethiopian Birr"),
	EUR("EUR","Euro"),
	FJD("FJD","Fijian Dollar"),
	FKP("FKP","Falkland Islands Pound"),
	GBP("GBP","British Pound Sterling"),
	GEL("GEL","Georgian Lari"),
	GGP("GGP","Guernsey Pound"),
	GHS("GHS","Ghanaian Cedi"),
	GIP("GIP","Gibraltar Pound"),
	GMD("GMD","Gambian Dalasi"),
	GNF("GNF","Guinean Franc"),
	GTQ("GTQ","Guatemalan Quetzal"),
	GYD("GYD","Guyanaese Dollar"),
	HKD("HKD","Hong Kong Dollar"),
	HNL("HNL","Honduran Lempira"),
	HRK("HRK","Croatian Kuna"),
	HTG("HTG","Haitian Gourde"),
	HUF("HUF","Hungarian Forint"),
	IDR("IDR","Indonesian Rupiah"),
	ILS("ILS","Israeli New Sheqel"),
	IMP("IMP","Manx pound"),
	INR("INR","Indian Rupee"),
	IQD("IQD","Iraqi Dinar"),
	IRR("IRR","Iranian Rial"),
	ISK("ISK","Icelandic Kr\u00f3na"),
	JEP("JEP","Jersey Pound"),
	JMD("JMD","Jamaican Dollar"),
	JOD("JOD","Jordanian Dinar"),
	JPY("JPY","Japanese Yen"),
	KES("KES","Kenyan Shilling"),
	KGS("KGS","Kyrgystani Som"),
	KHR("KHR","Cambodian Riel"),
	KMF("KMF","Comorian Franc"),
	KPW("KPW","North Korean Won"),
	KRW("KRW","South Korean Won"),
	KWD("KWD","Kuwaiti Dinar"),
	KYD("KYD","Cayman Islands Dollar"),
	KZT("KZT","Kazakhstani Tenge"),
	LAK("LAK","Laotian Kip"),
	LBP("LBP","Lebanese Pound"),
	LKR("LKR","Sri Lankan Rupee"),
	LRD("LRD","Liberian Dollar"),
	LSL("LSL","Lesotho Loti"),
	LTL("LTL","Lithuanian Litas"),
	LVL("LVL","Latvian Lats"),
	LYD("LYD","Libyan Dinar"),
	MAD("MAD","Moroccan Dirham"),
	MDL("MDL","Moldovan Leu"),
	MGA("MGA","Malagasy Ariary"),
	MKD("MKD","Macedonian Denar"),
	MMK("MMK","Myanma Kyat"),
	MNT("MNT","Mongolian Tugrik"),
	MOP("MOP","Macanese Pataca"),
	MRO("MRO","Mauritanian Ouguiya"),
	MUR("MUR","Mauritian Rupee"),
	MVR("MVR","Maldivian Rufiyaa"),
	MWK("MWK","Malawian Kwacha"),
	MXN("MXN","Mexican Peso"),
	MYR("MYR","Malaysian Ringgit"),
	MZN("MZN","Mozambican Metical"),
	NAD("NAD","Namibian Dollar"),
	NGN("NGN","Nigerian Naira"),
	NIO("NIO","Nicaraguan C\u00f3rdoba"),
	NOK("NOK","Norwegian Krone"),
	NPR("NPR","Nepalese Rupee"),
	NZD("NZD","New Zealand Dollar"),
	OMR("OMR","Omani Rial"),
	PAB("PAB","Panamanian Balboa"),
	PEN("PEN","Peruvian Nuevo Sol"),
	PGK("PGK","Papua New Guinean Kina"),
	PHP("PHP","Philippine Peso"),
	PKR("PKR","Pakistani Rupee"),
	PLN("PLN","Polish Zloty"),
	PYG("PYG","Paraguayan Guarani"),
	QAR("QAR","Qatari Rial"),
	RON("RON","Romanian Leu"),
	RSD("RSD","Serbian Dinar"),
	RUB("RUB","Russian Ruble"),
	RWF("RWF","Rwandan Franc"),
	SAR("SAR","Saudi Riyal"),
	SBD("SBD","Solomon Islands Dollar"),
	SCR("SCR","Seychellois Rupee"),
	SDG("SDG","Sudanese Pound"),
	SEK("SEK","Swedish Krona"),
	SGD("SGD","Singapore Dollar"),
	SHP("SHP","Saint Helena Pound"),
	SLL("SLL","Sierra Leonean Leone"),
	SOS("SOS","Somali Shilling"),
	SRD("SRD","Surinamese Dollar"),
	STD("STD","S\u00e3o Tom\u00e9 and Pr\u00edncipe Dobra"),
	SVC("SVC","Salvadoran Col\u00f3n"),
	SYP("SYP","Syrian Pound"),
	SZL("SZL","Swazi Lilangeni"),
	THB("THB","Thai Baht"),
	TJS("TJS","Tajikistani Somoni"),
	TMT("TMT","Turkmenistani Manat"),
	TND("TND","Tunisian Dinar"),
	TOP("TOP","Tongan Pa\u02bbanga"),
	TRY("TRY","Turkish Lira"),
	TTD("TTD","Trinidad and Tobago Dollar"),
	TWD("TWD","New Taiwan Dollar"),
	TZS("TZS","Tanzanian Shilling"),
	UAH("UAH","Ukrainian Hryvnia"),
	UGX("UGX","Ugandan Shilling"),
	USD("USD","United States Dollar"),
	UYU("UYU","Uruguayan Peso"),
	UZS("UZS","Uzbekistan Som"),
	VEF("VEF","Venezuelan Bol\u00edvar Fuerte"),
	VND("VND","Vietnamese Dong"),
	VUV("VUV","Vanuatu Vatu"),
	WST("WST","Samoan Tala"),
	XAF("XAF","CFA Franc BEAC"),
	XAG("XAG","Silver (troy ounce)"),
	XAU("XAU","Gold (troy ounce)"),
	XCD("XCD","East Caribbean Dollar"),
	XDR("XDR","Special Drawing Rights"),
	XOF("XOF","CFA Franc BCEAO"),
	XPF("XPF","CFP Franc"),
	YER("YER","Yemeni Rial"),
	ZAR("ZAR","South African Rand"),
	ZMK("ZMK","Zambian Kwacha (pre-2013)"),
	ZMW("ZMW","Zambian Kwacha"),
	ZWL("ZWL","Zimbabwean Dollar");
	
	private final String code;
	private final String description;

	Currency(String code, String description) {
		this.code = code;
        this.description = description;
	}

	public static Currency fromCode(String code) {
		for (Currency cur : Currency.values()) {
			if (cur.name().equals(code)) {
				return cur;
			}
		}
		throw new IllegalArgumentException(code);
	}

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

}
